import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/Home.vue'
import ToolsLayout from '@/views/tools/layout.vue'
import NotFound from '@/views/404.vue'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('@/views/Home.vue')
    },
    {
      path: '/tools',
      component: () => import('@/views/tools/index.vue')
    },
    {
      path: '/tools/calendar',
      component: () => import('@/views/tools/calendar/index.vue')
    },
    {
      path: '/tools/json',
      component: () => import('@/views/tools/json/index.vue')
    },
    {
      path: '/tools/xml',
      name: 'xml',
      component: () => import('@/views/tools/XmlFormatter.vue')
    },
    {
      path: '/tools/id-generator',
      name: 'id-generator',
      component: () => import('@/views/tools/IdGenerator.vue')
    },
    {
      path: '/:pathMatch(.*)*',
      component: () => import('@/views/404.vue')
    }
  ]
})

export default router 